HatchShape.AddHatchPatternLine

Adds a Line filling pattern to the hatch shape with more controls and definitions.

Overloads

public void AddHatchPatternLine(float borderGap, HatchLineBorderGapDirection borderGapDirection, float lineGap, float lineAngle, float baseX, float baseY, HatchLineStyle hatchStyle, bool withOffset, HatchOffsetAlgorithm algorithm, HatchCornerStyle cornerStyle, bool applySmoothing, LaserParameters laserParameters)
public void AddHatchPatternLine(float borderGap, HatchLineBorderGapDirection borderGapDirection, float lineGap, float lineAngle, float baseX, float baseY, HatchLineStyle hatchStyle, bool withOffset, HatchOffsetAlgorithm algorithm, HatchCornerStyle cornerStyle, bool applySmoothing)
public void AddHatchPatternLine(float borderGap, HatchLineBorderGapDirection borderGapDirection, float lineGap, float lineAngle, float baseX, float baseY, HatchLineStyle hatchStyle, bool withOffset, HatchOffsetAlgorithm algorithm, HatchCornerStyle cornerStyle)
public void AddHatchPatternLine(float borderGap, HatchLineBorderGapDirection borderGapDirection, float lineGap, float lineAngle, float baseX, float baseY, HatchLineStyle hatchStyle, bool withOffset, HatchOffsetAlgorithm algorithm, HatchCornerStyle cornerStyle, LaserParameters laserParameters)

 

Return value

void  

 

Parameters

float borderGap Set the boarder gap
float lineGap Set the line gap
float lineAngle Set the line angle
float baseX Set an X coordinate through which at least one hatch line will pass
float baseY Set an Y coordinate through which at least one hatch line will pass
bool withOffset Set whether the hatch should have an offset.
HatchLineBorderGapDirection borderGapDirection Set the boarder gap direction
HatchLineStyle hatchStyle Set the hatching style
HatchOffsetAlgorithm algorithm Set the hatching algorithm
HatchCornerStyle cornerStyle Set the corner style
bool applySmoothing Enable smoothing for hatch lines

 

Example

Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);

if (scanDocument != null)
{
    VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);

    vectorImage.SetMarkSpeed(1000);
    vectorImage.SetJumpSpeed(2000);
    vectorImage.SetJumpDelay(100);
    vectorImage.SetMarkDelay(100);

    //Set Laser Delays
    vectorImage.SetLaserOnDelay(10);
    vectorImage.SetLaserOffDelay(10);

    CircleShape circleShape1 = new CircleShape();
    circleShape1.CenterPoint.X = 0.0f;
    circleShape1.CenterPoint.Y = 0.0f;
    circleShape1.CenterPoint.Z = 0.0f;
    circleShape1.Radius = 5;
    vectorImage.AddCircle(circleShape1);

    CircleShape circleShape2 = new CircleShape();
    circleShape2.CenterPoint.X = 2.5f;
    circleShape2.CenterPoint.Y = 2.5f;
    circleShape2.CenterPoint.Z = 0.0f;
    circleShape2.Radius = 5;
    vectorImage.AddCircle(circleShape2);


    HatchShape hatchShape = new HatchShape();
    hatchShape.AddCircle(0, 0, 0, 5, 0.5f);
    hatchShape.AddCircle(2.5f, 2.5f, 0, 5, 0.5f);

    hatchShape.AddHatchPatternLine(0.5f, HatchLineBorderGapDirection.Inward, 0.05f,
                   0, 0, 0, HatchLineStyle.Serpentine, true,
                   HatchOffsetAlgorithm.DirectOffset, HatchCornerStyle.Sharp);

    vectorImage.AddHatch(hatchShape, 0);


    scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));

    try
    {
        scanDocument.StartScanning();
    }
    catch (Exception exp)
    {
        MessageBox.Show(exp.Message);
    }
}